home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / SegLoad.a < prev    next >
Encoding:
Text File  |  1997-08-12  |  2.7 KB  |  111 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        SegLoad.a
  3. ;
  4. ;    Contains:    Segment Loader Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.0.1
  8. ;
  9. ;    Copyright:    © 1985-1993, 1995-1997 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__SEGLOAD__') = 'UNDEFINED' THEN
  19. __SEGLOAD__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24.  
  25.     IF TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  26.  
  27. ;   CountAppFiles, GetAppFiles, ClrAppFiles, GetAppParms, getappparms, 
  28. ;   and the AppFile data structure and enums are obsolete. 
  29. ;   They are still supported for writing old style 68K apps, 
  30. ;   but they are not supported for CFM-based apps.
  31. ;   Use AppleEvents to determine which files are to be 
  32. ;   opened or printed from the Finder.
  33.  
  34.  
  35.  
  36. appOpen                            EQU        0                    ;Open the Document (s)
  37. appPrint                        EQU        1                    ;Print the Document (s)
  38. AppFile                    RECORD 0
  39. vRefNum                     ds.w    1                ; offset: $0 (0)
  40. fType                     ds.l    1                ; offset: $2 (2)
  41. versNum                     ds.w    1                ; offset: $6 (6)        ; versNum in high byte
  42. fName                     ds        Str255            ; offset: $8 (8)
  43. sizeof                     EQU *                    ; size:   $108 (264)
  44.                         ENDR
  45. ;
  46. ; pascal void CountAppFiles(short *message, short *count)
  47. ;
  48.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  49.         IMPORT_CFM_FUNCTION CountAppFiles
  50.     ENDIF
  51.  
  52. ;
  53. ; pascal void GetAppFiles(short index, AppFile *theFile)
  54. ;
  55.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  56.         IMPORT_CFM_FUNCTION GetAppFiles
  57.     ENDIF
  58.  
  59. ;
  60. ; pascal void ClrAppFiles(short index)
  61. ;
  62.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  63.         IMPORT_CFM_FUNCTION ClrAppFiles
  64.     ENDIF
  65.  
  66. ;
  67. ; pascal void GetAppParms(Str255 apName, short *apRefNum, Handle *apParam)
  68. ;
  69.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  70.         _GetAppParms:    OPWORD    $A9F5
  71.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  72.         IMPORT_CFM_FUNCTION GetAppParms
  73.     ENDIF
  74.  
  75.     ENDIF
  76.  
  77. ;   Because PowerPC applications don’t have segments.
  78. ;   But, in order to allow applications to not have conditionalized
  79. ;   source code, UnloadSeg is macro'ed away for PowerPC.
  80.  
  81.  
  82.     IF TARGET_CPU_68K THEN
  83. ;
  84. ; pascal void UnloadSeg(void *routineAddr)
  85. ;
  86.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  87.         _UnloadSeg:    OPWORD    $A9F1
  88.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  89.         IMPORT_CFM_FUNCTION UnloadSeg
  90.     ENDIF
  91.  
  92.     ENDIF    ; TARGET_CPU_68K
  93.  
  94.  
  95.  
  96.     IF OLDROUTINELOCATIONS THEN
  97. ;
  98. ; pascal void ExitToShell(void )
  99. ;
  100.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  101.         _ExitToShell:    OPWORD    $A9F4
  102.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  103.         IMPORT_CFM_FUNCTION ExitToShell
  104.     ENDIF
  105.  
  106.     ENDIF    ; OLDROUTINELOCATIONS
  107.  
  108.  
  109.     ENDIF ; __SEGLOAD__ 
  110.  
  111.